package com.xinqi.modules.homework.homework.convert;

import com.xinqi.modules.homework.homework.domain.CourseHomeworkRecordEntity;
import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.homework.homework.dto.req.CourseHomeworkRecordCreateDTO;
import com.xinqi.modules.homework.homework.dto.req.CourseHomeworkRecordUpdateDTO;
import com.xinqi.modules.homework.homework.dto.rsp.CourseHomeworkRecordResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

import java.util.List;

/**
 * 作业学生提交记录表转换
 *
 * @author: system
 * @date: 2023/03/08
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class CourseHomeworkRecordConvert {

    public abstract CourseHomeworkRecordEntity create(CourseHomeworkRecordCreateDTO s);

    public abstract CourseHomeworkRecordEntity newEntity(CourseHomeworkRecordEntity s);

    public abstract CourseHomeworkRecordEntity update(CourseHomeworkRecordUpdateDTO s, @MappingTarget CourseHomeworkRecordEntity t);

    public abstract CourseHomeworkRecordEntity update(CourseHomeworkRecordUpdateDTO s);

    public abstract CourseHomeworkRecordResultDTO convert(CourseHomeworkRecordEntity s);

    public abstract List<CourseHomeworkRecordResultDTO> convert(List<CourseHomeworkRecordEntity> list);

}
